<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3 Transform 3D 转换</title>
</head>
<style>
*{
    margin: 0;
    padding: 0;
}
.container{
    width: 300px;
    height: 300px;
    border: 1px solid red;
    margin: 100px auto;
    perspective: 500px;
}
.box{
    width: 200px;
    height: 200px;
    background-color: red;
    transform: rotateX(45deg);
    transform-style: preserve-3d;
}
.child{
    width: 100px;
    height: 100px;
    background-color: blue;
    transform: rotateX(45deg);
}

</style>
<body>
    <div class="container">
        <div class="box">
            <div class="child"></div>
        </div>
    </div>
</body>
</html>